home *** CD-ROM | disk | FTP | other *** search
/ Aminet 5 / Aminet 5 - March 1995.iso / Aminet / dev / basic / RIBlitzLibs.lha / riblitzlibs / docs / RIAnimLib.doc < prev    next >
Encoding:
Text File  |  1995-01-28  |  4.2 KB  |  107 lines

  1. -----------------------------------------------------------------------------
  2. ====                        RI ANIM Library V1.3 (C)94/95              ====
  3. -----------------------------------------------------------------------------
  4.  
  5.                         Written By Stephen McNamara
  6.                         ©94/95 Leading Edge Software
  7.  
  8.  
  9. This library enables the playback of both Anim5 and Anim7 format
  10. animations.  It allows you to playback animations at any co-ordinate in a
  11. bitmap and supports different palettes for frames of the animation.  It
  12. also allows you to playback animations from FAST ram, thus you can now play
  13. massive animations that can only fit in FAST ram.
  14.  
  15. When playing back animations you must make sure that your display is
  16. double-buffered.  Please refer to the Blitz manual for information about
  17. how anims can be played back properly - or look at the example program
  18. included with this file.
  19.  
  20. There has been some extensive testing of this library.  The result of this
  21. is that all none problems with it have been fixed.  Bug fixes include loop
  22. frame anims not looping properly and anims with separate palettes per frame
  23. now play correctly.
  24.  
  25.  
  26. Command list:
  27.     [suc=]RIAnimInit(address,bitmap#,palette# [,xy_offset]|[,x,y])
  28.     [suc=]RINextAnimFrame bitmap#
  29.     AnimLoop
  30.  
  31. New commands:
  32.     num.w=RIAnimFrameCount
  33.  
  34. Updated commands:
  35.     RIAnimInit now accepts offset as x,y coordinates.
  36.  
  37.  
  38. Statement/Function: RIAnimInit
  39. ------------------------------------------------------------------------
  40. Modes : Amiga/Blitz
  41. Syntax: [suc=]RIAnimInit(address,bitmap#,palette# [,xy_offset]|[,x,y])
  42.  
  43.   This command attempts to take an animation held in memory (CHIP or FAST)
  44. and identify it as a supported animation format.  If it identifies it okay
  45. it will set up the animation by unpacking frame 1 of the anim onto the
  46. specified bitmap and copying the palette to the specified palette object.
  47. You must ensure that the bitmap is big and deep enough to actually hold the
  48. animation.  At the moment there is no checking of the bitmap size.  The
  49. palette object you give is automatically resized to the size of the palette
  50. in the animation.
  51.  
  52.   The optional parameter allows you to play an animation at an offset into
  53. a bitmap.   This command has been extended so that you can specific the
  54. optional offset into the bitmap as either a byte value, or a x,y coordinate.
  55. Given in offset form, you should use the following formula to calculate the
  56. value to use:
  57.  
  58.       offset=(X/8)+(Y*(pixel_width/8))
  59.  
  60.       where: X and Y are your co-ordinates
  61.              pixel_width is the width of your bitmap.
  62.  
  63.   Offset form is kept for compatibility with older versions of this
  64. library.  You should unsure that your animation will never go off screen
  65. when using the offset parameter(s).  Incorrect placement could cause a
  66. crash of your machine.
  67.  
  68.   If used as a function, this command returns true for a successful
  69. initialise or false for failure.
  70.  
  71.  
  72. Statement/Function: RINextAnimFrame
  73. ------------------------------------------------------------------------
  74. Modes : Amiga/Blitz
  75. Syntax: [suc=]RINextAnimFrame bitmap#
  76.  
  77.   This command attempts to unpack the next frame of a previously
  78. initialised animation onto the specified bitmap.  It returns true or false
  79. to say whether it succeeded or not.
  80.  
  81.  
  82. Statement: AnimLoop
  83. ------------------------------------------------------------------------
  84. Modes : Amiga/Blitz
  85. Syntax: AnimLoop ON|OFF
  86.  
  87.   This command allows you to control the looping mode of the animation.
  88. With animloop off, playback of an animation will stop at the last frame of
  89. it.  Any attempt to draw another frame will fail.  With it on, though, the
  90. animation will loop around.
  91.  
  92.   Note: you must ensure that your animation has loop frames at the end of
  93. it if you want to loop the animation around.  The reverse of this is true
  94. for animloop off - the animation must not have loop frames if you don't
  95. want it to loop around.  If you select animloop off but have looping frames
  96. in your anim then the animation will end by displaying a copy of frame 2
  97. of the animation.
  98.  
  99.  
  100. Function: RIAnimFrameCount
  101. ------------------------------------------------------------------------
  102. Modes : Amiga/Blitz
  103. Syntax: numframes=RIAnimFrameCount
  104.  
  105.   This command allows you to count the number of frames in the currently
  106. initialised animation.
  107.